package etc.spec.ytt.week02;

public class Fish{
    public String name;
    public Fish(String name){
        this.name=name;
    }
    public String getName(){
        return this.name;
    }
    public void eat(Sheel sheel){
        System.out.println("I eat"+this.name+",我吃"+sheel.getName());
    }
    public void eat(Sheel sheel,Prawn prawn){
        System.out.println("我是"+this.name+",我先吃"+sheel.getName()+"后吃");
    }
    public void eat(Sheel sheel,Prawn prawn,Seal seal){
        System.out.println("我是"+this.name+",我先吃"+sheel.getName()+"我再吃"+prawn.getName()+"后吃"+seal.getName());
    }
    public static void main(String[] args){
        Sheel s=new Sheel("扇贝");
        Prawn p=new Prawn("龙虾");
        Seal seal=new Seal("海豹");
        Fish f=new Fish("鲨鱼");
        f.eat(s);
        f.eat(s,p);
        f.eat(s,p,seal);
    }
}
